<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>lesson 32</title>
    <script src="https://unpkg.com/vue@next"></script>
</head>

<body>
    <div id="root"></div>
</body>

</html>

<script>
    // plugin 插件，也是把通用性的功能封装起来
    const myPlugin = {
        install(app, options) {
            console.log(app, options);
        }
    }
    const app = Vue.createApp({
        template: `
            <my-title />
        `
    });

    app.component('my-title', {
        template: `<div>Hello world</div>`
    });

    app.use(myPlugin);

    const vm = app.mount("#root");
</script>